home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Deutsche Edition 1
/
Deutsche Edition 1.iso
/
amok
/
051-060
/
amok52
/
gadgeted
/
txt
/
test1.mod
< prev
next >
Wrap
Text File
|
1993-11-04
|
2KB
|
55 lines
(*----------------------------------------------------------------------
:Program. Test1.mod
:Contents. Testprogramm für GadgetEd
:Contents. Verwendet die Struktur "Req1" in eigenem Window
:Author. Hubert Bildstein
:Copyright. Public Domain
:Language. Modula-2
:Translator. M2Amiga V3.3d
:History. V1.0 5.12.1990
----------------------------------------------------------------------*)
MODULE Test1;
FROM SYSTEM IMPORT ADR;
FROM Req1 IMPORT InitReq1,CloseReq1,GetReq1GPtr;
FROM Gadgets IMPORT WaitForGadget, DefineWindow;
FROM Intuition IMPORT WindowPtr, IDCMPFlagSet, IDCMPFlags, GadgetPtr,
NewWindow,OpenWindow,WindowFlags,WindowFlagSet,
ScreenFlagSet,ScreenFlags;
FROM InOut IMPORT WriteInt,WriteString,WriteLn;
VAR w : WindowPtr;
nw : NewWindow;
c : IDCMPFlagSet;
id : INTEGER;
gp : GadgetPtr;
BEGIN
WITH nw DO (* eigenes Window aufbauen *)
leftEdge := 0; topEdge := 0; width := 500; height := 100;
detailPen := 0; blockPen := 1;
idcmpFlags := IDCMPFlagSet{closeWindow,gadgetUp,gadgetDown};
flags := WindowFlagSet{windowClose,windowDrag};
firstGadget := NIL; checkMark := NIL;
title := ADR("Test1");
bitMap := NIL; type := ScreenFlagSet{wbenchScreen};
END; (*WITH*)
w := OpenWindow (nw); (* Window eröffnen *)
(* Gadgets in Window einbauen, verwende dabei eigenes Window *)
InitReq1 (w,NIL,NIL);
DefineWindow (w); (* Window für Gadgets-Modul festlegen *)
REPEAT (* Auf Meldung warten und ID ausgeben *)
WaitForGadget (c,id,gp);
WriteString ("ID = "); WriteInt (id,5); WriteLn;
UNTIL (id = -1);
CloseReq1; (* Window schließen *)
END Test1.